home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / GETLDATE.CC < prev    next >
Text File  |  1993-04-04  |  1KB  |  31 lines

  1. #include <dos.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. long int get_long_date()
  6. /*
  7. ┌────────────────────────────────────────────────────────────────────┐
  8. │Purpose: Get the current date.                                      │
  9. │                                                                    │
  10. │ Inputs: None.                                                      │
  11. │                                                                    │
  12. │Outputs: None.                                                      │
  13. │                                                                    │
  14. │ Return: A long int containing the current date in the format       │
  15. │         YYMMDD.                                                    │
  16. └────────────────────────────────────────────────────────────────────┘
  17. */
  18. {
  19.  
  20. struct date today;
  21. char mystr[40];
  22. long l_date;
  23.  
  24.     getdate(&today);
  25.     sprintf(mystr,"%2.2d%2.2d%2.2d",
  26.         today.da_year - 1900,today.da_mon,today.da_day);
  27.  
  28.     l_date = atol(mystr);
  29.     return(l_date);
  30. }
  31.